Technical Q&A
TB35 - Obtaining Standard Icons (23-December-97)
Q
Where do I get the standard icons for a folder, generic document, disk
volume, etc.?
A
The resource ID's of many of the desirable icon suites are documented
starting on page 1-129 of Inside Macintosh: More Macintosh Toolbox in the
section called "Standard Icons". It's a safe bet these resource ID's will
remain usable into the indefinite future.
However, some commonly requested icons are not available
programmatically, or at least their resource ID's are not documented in
Inside Macintosh. These icons include many of the icons Finder displays
for FindFolder selectors new to Mac OS 8. Probably the most often
requested icon is the icon Finder 8 displays for hard disk volumes
controlled by an Apple driver. (It's not the same icon produced by the
disk driver; at the time Finder 8 was built, disk drivers could provide
only black-and-white icons.) At present, there is no good way to obtain
these icons programmatically.
For now, the best way to obtain an icon whose ID is not documented in
Inside Macintosh is to find the icon you like (most of the interesting ones can
be found in the "System", "Finder", or "Appearance Extension" files) and
copy it into your application resource fork (being careful to renumber it
to something above 127, of course).
One thing you'll want to avoid is searching the system files for icons
and using their ID's in your program. In the future, icons with
undocumented ID's may not have the ID's they have today, and in fact they
may not even have the same resource type!
We do not expect that any of these icons (including the documented ones)
will change according to theme.
-- Pete Gontier
Worldwide Developer Technical Support
Technical Q&A
Previous Question |
Contents |
Next Question
To contact us, please use the Contact Us page.
|